import request from '@/router/axios';
// 总的主机的信息
export function getTotalHostList(query) {
  return request({
    url: 'static/josnDataTest/service-host.json',
    method: 'get',
    params: query
  });
}

export function getHadoopList(query) {
  console.log('--------------getHadoopList');
  return request({
    url: 'static/josnDataTest/hadoopList.json',
    method: 'get',
    params: query
  });
}

export function getZabbixList(query) {
  return request({
    url: 'static/josnDataTest/zabbixList.json',
    method: 'get',
    params: query
  });
}

export function getHostList() {
  return request({
    url: 'static/josnDataTest/hostList.json',
    method: 'get'
  });
}

// 以下请求都是请求一个具体的主机的信息
export function getNet(hostname) {
  return request({
    url: 'static/josnDataTest/' + hostname + '/net.json',
    method: 'get'
  });
}

export function getMemory(hostname) {
  return request({
    url: 'static/josnDataTest/' + hostname + '/memory.json',
    method: 'get'
  });
}

export function getCpu(hostname) {
  return request({
    url: 'static/josnDataTest/' + hostname + '/cpu.json',
    method: 'get'
  });
}

export function getDisk(hostname) {
  return request({
    url: 'static/josnDataTest/' + hostname + '/disk.json',
    method: 'get'
  });
}
